# Contributor: Sheila Aman <sheila@vulpine.house>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ack
pkgver=3.7.0
pkgrel=1
pkgdesc="A Perl-powered replacement for grep"
url="https://beyondgrep.com/"
arch="noarch"
license="Artistic-2.0"
depends="perl-file-next perl"
makedepends="perl-dev"
checkdepends="bash"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
3d97309956ce65f972a7636d195b13031f4441981d5bdddf0b67e577c32c88972f7ed02ffafbbf73c4db9a22f200f95cce9c8eb2a6f47fd60143d93469038f57  ack-v3.7.0.tar.gz
"
